<%@page import="cn.util.Const"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<header class="header style7">
    <div class="top-bar">
        <div class="container">
            <div class="top-bar-left">
                <div class="header-message">
                    	宠物管理系统
                </div>
            </div>
            <div class="top-bar-right">
                <ul class="header-user-links">
                    <li>
                    <c:if test="${empty sessionScope.users or sessionScope.role!=1}">
                        <a href="<%=Const.ROOT %>login.jsp">登陆 | 注册</a>
                    </c:if>
                    <c:if test="${not empty sessionScope.users and sessionScope.role==1}">
                    	<a href="<%=Const.ROOT %>carts?action=query">我的购物车</a>
                    	<a href="<%=Const.ROOT %>orders?action=query">我的订单</a>
                    	<a href="#">个人资料</a>
                    	<a href="#">修改密码</a>
                    	<a href="#">欢迎您:${sessionScope.users.name }</a>
                    	<a href="<%=Const.ROOT %>users?action=logout">退出</a>
                    </c:if>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="container">
        <div class="main-header">
            <div class="row">
                <div class="col-lg-3 col-sm-4 col-md-3 col-xs-7 col-ts-12 header-element">
                    <div class="logo">
                        <a href="<%=Const.ROOT %>index">
                            <img src="<%=Const.ROOT %>assets/images/logo.png" alt="img">
                        </a>
                    </div>
                </div>
                <div class="col-lg-7 col-sm-8 col-md-6 col-xs-5 col-ts-12">
                    <div class="block-search-block">
                        <form class="form-search form-search-width-category" action="<%=Const.ROOT %>index" method="post">
                            <div class="form-content">
                                <div class="inner">
                                    <input type="text" class="input" name="name" value="" placeholder="请输入商品名称">
                                </div>
                                <button class="btn-search" type="submit">
                                    <span class="icon-search"></span>
                                </button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="header-nav-container">
        <div class="container">
            <div class="header-nav-wapper main-menu-wapper">
                <div class="vertical-wapper block-nav-categori">
                    <div class="block-title">
						<span class="icon-bar">
							<span></span>
							<span></span>
							<span></span>
						</span>
                        <span class="text">首页</span>
                    </div>
                </div>
                <div class="header-nav">
                    <div class="container-wapper">
                        <ul class="teamo-clone-mobile-menu teamo-nav main-menu " id="menu-main-menu">
                            <li class="menu-item">
                                <a href="<%=Const.ROOT %>message?action=query" class="teamo-menu-item-title" title="About">留言</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<!--移动端-->
<div class="header-device-mobile">
    <div class="wapper">
        <div class="item mobile-logo">
            <div class="logo">
                <a href="#">
                    <img src="<%=Const.ROOT %>assets/images/logo.png" alt="img">
                </a>
            </div>
        </div>
        <div class="item item mobile-search-box has-sub">
            <a href="#">
						<span class="icon">
							<i class="fa fa-search" aria-hidden="true"></i>
						</span>
            </a>
            <div class="block-sub">
                <a href="#" class="close">
                    <i class="fa fa-times" aria-hidden="true"></i>
                </a>
                <div class="header-searchform-box">
                    <form class="header-searchform" action="<%=Const.ROOT %>index" method="post">
                        <div class="searchform-wrap">
                            <input type="text" name="name" class="search-input" placeholder="请输入商品名称">
                            <input type="submit" class="submit button" value="搜索">
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="item mobile-settings-box has-sub">
            <a href="#">
						<span class="icon">
							<i class="fa fa-user" aria-hidden="true"></i>
						</span>
            </a>
            <div class="block-sub">
                <a href="#" class="close">
                    <i class="fa fa-times" aria-hidden="true"></i>
                </a>
                <div class="block-sub-item">
                    <h5 class="block-item-title">个人中心</h5>
                    <form class="currency-form teamo-language">
                        <ul class="teamo-language-wrap">
                            <c:if test="${sessionScope.role!=1}">
	                            <li class="active">
	                                <a href="<%=Const.ROOT%>login.jsp">
												<span>
													登录|注册
												</span>
	                                </a>
	                            </li>
                            </c:if>
                            <c:if test="${sessionScope.role==1}">
                            <li>
                                <a href="#">
											<span>
												购物车
											</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">
											<span>
												我的订单
											</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">
											<span>
												个人资料
											</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">
											<span>
												修改密码
											</span>
                                </a>
                            </li>
                            <li>
                                <a href="#">
											<span>
												退出
											</span>
                                </a>
                            </li>
                            </c:if>
                        </ul>
                    </form>
                </div>
            </div>
        </div>
        <div class="item menu-bar">
            <a class=" mobile-navigation  menu-toggle" href="#">
                <span></span>
                <span></span>
                <span></span>
            </a>
        </div>
    </div>
</div>
<!--移动端end-->